{{ if and (eq .Values.controlPlane.mode "zone") .Values.controlPlane.tls.kdsZoneClient.create }}
apiVersion: v1
kind: Secret
metadata:
{{ with .Values.controlPlane.tls.kdsZoneClient.secretName }}
  name: {{ . }}
{{ else }}
  name: {{ include "kuma.name" . }}-kds-zone-client-tls
{{ end }}
  labels: {{ include "kuma.cpLabels" . | nindent 4 }}
stringData:
  ca.crt: {{ required "you must provide a kds cert" .Values.controlPlane.tls.kdsZoneClient.cert | quote }}
{{ end }}
